<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			let systemInfo = uni.getSystemInfoSync();
			let statusBarHeight = systemInfo.statusBarHeight;
			
			this.$store.commit('setStatusBarHeight', statusBarHeight)
		},
		onShow: function() {
			console.log('App Show')
			/** 判断当前是否是存在 token */
			if(!this.$store.state.token) {
				uni.reLaunch({
					url: '/pages/login/index'
				});
			}
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">	
	@import "@/uni_modules/uview-ui/index.scss"; //引入uView基础样式
	@import "@/static/css/common.scss";
</style>